package com.zyb.framework.generator;

import com.baomidou.mybatisplus.core.incrementer.IKeyGenerator;
import org.springframework.stereotype.Component;

import java.util.UUID;

/**
 * 描述:
 *
 * @author z3412
 * @create 2019-08-13 22:24
 */

@Component
public class UUIDKeyGenerator implements IKeyGenerator {
    @Override
    public String executeSql(String incrementerName) {
        String uuid =  UUID.randomUUID().toString();

        return "select '"+uuid +"'from dual";
    }
}
